# -*- makefile -*-

LIBUTL/     :=$(realpath $/../libutil/)/
LIBBIO/     :=$(realpath $/../libbio/)/
LIBSEQ/     :=$(realpath $/../libseq/)/

src    := $/seqFile.H \
          $/fastaFile.H   $/fastaFile.C \
          $/fastaStdin.H  $/fastaStdin.C \
          $/fastqFile.H   $/fastqFile.C \
          $/fastqStdin.H  $/fastqStdin.C \
          $/seqStore.H    $/seqStore.C \
          $/sffFile.H     $/sffFile.C \
          $/seqFactory.H  $/seqFactory.C \
          $/seqCache.H    $/seqCache.C \
          $/seqStream.H   $/seqStream.C \
          $/merStream.H   $/merStream.C

$/.CXX_SRCS  :=$(filter %.C,${src}) $/test-seqCache.C $/test-seqStream.C $/test-merStream.C
$/.CXX_INCS  :=$(filter %.H,${src})
$/.CXX_EXES  :=$/test-seqCache $/test-seqStream $/test-merStream
$/.CXX_LIBS  :=$/libseq.a

$/.CLEAN := $/*.o

$/libseq.a       : ${$/.C_SRCS:.c=.o} ${$/.CXX_SRCS:.C=.o}

$/test-seqCache  : $/test-seqCache.o  ${LIBSEQ/}libseq.a ${LIBBIO/}libbio.a ${LIBUTL/}libutil.a
$/test-seqStream : $/test-seqStream.o ${LIBSEQ/}libseq.a ${LIBBIO/}libbio.a ${LIBUTL/}libutil.a
$/test-merStream : $/test-merStream.o ${LIBSEQ/}libseq.a ${LIBBIO/}libbio.a ${LIBUTL/}libutil.a

$(eval $/%.d $/%.o: CFLAGS   += -I${LIBUTL/} -I${LIBBIO/} -I${LIBSEQ/})
$(eval $/%.d $/%.o: CXXFLAGS += -I${LIBUTL/} -I${LIBBIO/} -I${LIBSEQ/})

